package com.xm;

/**
 * @Author：xm
 * @Project：runoob
 * @Date：2024/7/23 21:55
 */

public class Temp {
    public static void main(String[] args) {
        ITemp iTemp = new ITemp() {
            @Override
            public String swim(String str, String str2) {
                return str;
            }
        };
        System.out.println(iTemp.swim("111", "1"));

        System.out.println(new ITemp() {
            @Override
            public String swim(String str, String str2) {
                // System.out.println();
                // return System.out.println();
                return str;
            }
        }.swim("222", "2"));

        ITemp iTemp3 = (str, str333) -> {
            return str;
        };
        System.out.println(iTemp3.swim("333", "3"));

        System.out.println(((ITemp)(str, str2) -> {
            return str;
        }).swim("444", "4"));

        System.out.println(((ITemp) (str, str2) -> str).swim("555", "5"));
    }
}